home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / cuj0696.zip / DWYER.ZIP / SPECTRAL.TST / XMATPRT.CX < prev    next >
Text File  |  1996-02-29  |  884b  |  31 lines

  1. /* ============ */
  2. /* xmatprt.cx    */
  3. /* ============ */
  4. #include <stdio.h>
  5. #include <xtendefs.h>
  6. /* ==================================================================== */
  7. /* XmatPrt - prints i x i matrix a on Unit with title for Spectral Test    */
  8. /* ==================================================================== */
  9. void
  10. XmatPrt(USHORT *a, short i, short n, FILE * Unit, char *title)
  11. {
  12.     short     k, m;
  13.  
  14.     /* -------------------------------------------------- */
  15.     /* Prints an i x i matrix embedded in an n x n matrix */
  16.     /* -------------------------------------------------- */
  17.     fprintf(Unit, "%s\n", title);
  18.  
  19.     for (k = 1; k <= i; ++k)
  20.     {
  21.     fprintf(Unit, "   Row %d:\n", k);
  22.  
  23.     for (m = 1; m <= i; ++m)
  24.     {
  25.         char    Label[16];
  26.         sprintf(Label, "\t(%2d)  ", m);
  27.         XFPRINTF(Unit, Label, a + XML(k, m, n), NDEC);
  28.     }
  29.     }
  30. }
  31.